package main

import "fmt"

type Teacher struct {
	Name   string
	Age    int
	School string
}

func main() {
	//var t *Teacher =new(Teacher)
	//(*t).Name="A"
	//(*t).Age=23
	//(*t).School="AA"
	//t.School="AAA" //编译器底层对t.School转化为(*t.School)
	//fmt.Println(*t)
	aa := &Teacher{School: "sd"}
	bb := &Teacher{School: "sd"}
	fmt.Printf("%p\n",aa)
	fmt.Printf("%p",bb)
	//AAA(aa)
	//AAA(bb)
	//fmt.Println(aa)

	fmt.Println("======================")

}
func AAA(teacher *Teacher) {
	teacher.School = "gg"
	fmt.Printf("%v\n", teacher)
}

type Student struct {
	Age int
}
type stu Student //定义别名

type Person struct {
	Age int
}
